package com.qb.common.bean

/**
 *
 * @author 张灿阳
 * @since 2023/3/3
 */
class EventBusBean<T> {
    /**
     * 消息类型
     */
    private var type = 0

    /**
     * 人脸token
     */
    private var faceToken: ByteArray?=null

    /**
     * 人脸id
     */
    private var trackId: Long = 0
    private var faceResultScore = 0f
    private var data: T? = null

    /**
     * 柜格Id
     */
    private val cabinetCellId = 0
    private var cabinetUseStatus = 0
    private var isRegSuccess = false
    private var userId: String? = null

    //网线信号强度
    private var level = 0
    private var dbm = 0

    constructor(type: Int)

    constructor(type: Int, data: T) {
        this.type = type
        this.data = data
    }

    constructor(type: Int, data: T, cabinetUseStatus: Int) {
        this.type = type
        this.data = data
        this.cabinetUseStatus = cabinetUseStatus
    }

    constructor(type: Int, faceToken: ByteArray?, trackId: Long, faceResultScore: Float) {
        this.type = type
        this.faceToken = faceToken
        this.trackId = trackId
        this.faceResultScore = faceResultScore
    }

    constructor(type: Int, level: Int, dbm: Int) {
        this.type = type
        this.level = level
        this.dbm = dbm
    }

    constructor(type: Int, isRegSuccess: Boolean, userId: String?) {
        this.type = type
        this.isRegSuccess = isRegSuccess
        this.userId = userId
    }
}